// JavaScript Document
//左边导航点击
$(document).ready(function  () {
	//loadUrl 在common.js里
	$(".nav_menu").each(function (index,item) {
			if (index == 0) {
				var $a = $(item).children("ul").children("li").children("a");
				loadUrl($a.html(),$a.attr("href"));
				return;
			}
			$(item).children("ul").hide();
	})
	$(".nav_menu").click(function () {
	 	$(this).children("ul").slideDown().end().siblings().children("ul").hide();
	})
	
	$(".nav_menu li a").each(function (index,item) {
		$(item).click(function () {
			loadUrl($(item).html(),$(item).attr("href"));
			return false;
		})
	})
})

//高度铺满
$(document).ready(function  () {
	var resize=function () {
		var clientHeight = document.documentElement.clientHeight;
		var headHeight = $("#header").height();
		var wrapHeight = clientHeight-headHeight;
		$(".wrap").each(function (index,item){
			$(item).css("height",wrapHeight)
		})
		var mainBoxHeight = wrapHeight-$("#mainTitle").height();
		$("#mainBox").css("height",mainBoxHeight);
	}
	resize();
	window.onresize=resize;
});



/* 查询选项卡 */
function hideAll() {
	document.getElementById("num").style.display = "none";
	document.getElementById("time").style.display = "none";
	document.getElementById("state").style.display = "none";
	document.getElementById("ubg").style.backgroundImage='url(../images/btn/menubtn.png)';
	document.getElementById("sbg").style.backgroundImage='url(../images/btn/menubtn.png)';
	document.getElementById("tbg").style.backgroundImage='url(../images/btn/menubtn.png)';
}

function sernShow() {
	hideAll();
	document.getElementById("num").style.display = "";
	document.getElementById("ubg").style.backgroundImage='url(../images/btn/menubtn1.png)';
}
function sertShow() {
	hideAll();
	document.getElementById("time").style.display = "";
	document.getElementById("tbg").style.backgroundImage='url(../images/btn/menubtn1.png)';
}
function sersShow() {
	hideAll();
	document.getElementById("state").style.display = "";
	document.getElementById("sbg").style.backgroundImage='url(../images/btn/menubtn1.png)';
}
